home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / utility / utilcli / getinfo.lha / Getinfo.txt < prev    next >
Text File  |  1996-04-02  |  3KB  |  99 lines

  1. Program: GetAvailMem, GetInfo, GetFileInfo 
  2. Author: Peter Hutchison 
  3. Date: Dec 1993
  4. Language: SAS C 5.10
  5. Machine: Amiga
  6. OS: WB 2 upwards
  7.  
  8. Introduction
  9. ------------
  10.  
  11. AmigaDOS is a very useful language but limited when it comes to scripts.
  12. These programs get their information but instead of displaying them like
  13. Avail, Info and List does, it sets variables, ready to be used by your
  14. script programs. 
  15.  
  16. GetAvailMem
  17. -----------
  18.  
  19. Format: GetAvailMem [CHIP|FAST|ALL]
  20.  
  21. Description: This little program will return available memory in a global
  22. environment variable called: MEMORY.
  23.  
  24. Example:  1.RAM> GetAvailMem Chip
  25.           1.RAM> Getenv memory
  26.           920355
  27.           1.RAM> echo $Memory
  28.           920355
  29.           
  30. GetInfo
  31. -------
  32.  
  33. Format: GetInfo <device> [ERR|UNIT|STATE|BLOCKS|USED|TYPE]
  34.  
  35. Description: This program will return information about a device and 
  36. returns either a number or text in a variable called: INFO.
  37.    
  38.    Option      Result      Description
  39.    ERR         Number      Number of soft errors on the device
  40.    UNIT        Number      Results the unit number where device is
  41.                            mounted
  42.    STATE       Text        Returns the following states:
  43.                            PROTECTED, VALIDATED, VALIDATING
  44.    BLOCKS      Number      Returns number of blocks on disk
  45.    USED        Number      Returns number of blocks used by data
  46.    TYPE        Text        Returns the following types:
  47.                            NODISK, UNREAD, DOSDISK, FFSDISK,
  48.                            NOTDOS, KICKSTART, MSDOS.
  49.                            
  50. Example: 1.RAM> Getinfo df0: used
  51.          1.RAM> Getenv info
  52.          200
  53.          1.RAM> Getinfo df0: type
  54.          1.RAM> Getenv info
  55.          DOSDISK
  56.           1.RAM>
  57.  
  58. GetFileInfo
  59. -----------
  60.                                     
  61. Format: GetFileInfo <file> [TYPE|NAME|PRO|SIZE|BLOCKS|COMMENT]
  62.  
  63. Description: Returns information about the file in an environment variable
  64. called FILE. The options return the following:
  65.  
  66.    Option   Type     Description
  67.    TYPE     Text     File type: FILE or DIRECTORY
  68.    NAME     Text     Name of file
  69.    PRO      Text     The protection bits (not working very well)
  70.    SIZE     Number   The size of the file in bytes
  71.    BLOCKS   Number   The size of the file in blocks
  72.    COMMENT  Text     The file note attached to the file
  73.    
  74. Example:  1.RAM> GetFileInfo MyFile.txt size
  75.           1.RAM> Getenv file
  76.           4086
  77.           1.RAM> 
  78.           
  79. Distribution:
  80. -------------
  81.  
  82. This archive and its contents belong to Peter Hutchison but it is 
  83. FreeWare. You may make as many copies as you wish and use it where
  84. you wish. The source is included for Programmers.
  85.  
  86.    Files:  GetFileInfo.c     GetFileInfo
  87.            GetInfo.c         GetInfo
  88.            GetAvailMem.c     GetAvailMem
  89.            Getinfo.txt
  90.            
  91.  
  92. Contact
  93. -------
  94.  
  95. Peter Hutchison
  96. Fido: 2:250/366.24
  97. EMail: cmsxpjh@hud.ac.uk
  98.  
  99.